We present a lattice-based numerical method to describe the non equilibrium behavior of a simple fluid under non-uniform spatial conditions. The evolution equation for the one-particle phase-space distribution function is derived starting from a microscopic description of the system. It involves a series of approximations which are similar to those employed in theories of inhomogeneous fluids, such as Density Functional theory. Among the merits of the present approach: the possibility to determine the equation of state of the model, the transport coefficients and to provide an efficient method of numerical solution under non-uniform conditions. The algorithm is tested in a particular non equilibrium situation, namely the steady flow of a hard-sphere fluid across a narrow slit. Pronounced non-hydrodynamic oscillations in the density and velocity profiles are found.